<template>
  <el-table
      :data="orders"
      style="width: 100%">
    <el-table-column
        prop="orderNo"
        label="订单号"
        width="180">
    </el-table-column>
    <el-table-column
        prop="orderRealPrice"
        label="订单价格"
        width="180">
    </el-table-column>
    <el-table-column
        label="订单状态">
      <template slot-scope="scope">
        <el-tag :type="orderStatue[scope.row.orderState].type">{{orderStatue[scope.row.orderState].statue}}</el-tag>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
import {getOrderSimpleLimit} from "@/network/dashboard";
export default {
  name: "Orders",
  data(){
    return{
      orders:[],
      orderStatue: [
        {'statue':'已取消','type':'info'},
        {'statue':'待付款','type':'danger'},
        {'statue':'已付款','type':'success'},
        {'statue':'待确认','type':'warning'},
        {'statue':'已确认','type':'success'},
        {'statue':'已入住','type':'success'},
        {'statue':'待评论','type':'warning'},
        {'statue':'已完成','type':'info'},
        {'statue':'待退款','type':'danger'},
        {'statue':'已退款','type':'danger'},
        {'statue':'错误','type':'danger'},
      ],//订单状态
    }
  },
  created() {
    getOrderSimpleLimit('create_time',6).then(res=>{
      this.orders = res.data.data
    })
  }
}
</script>

<style scoped>

</style>